The Nikkei index gained 0.06% on Friday to 20,418.81. The index fell 1.2% in the previous session. The broader Topix added 0.1% to 1,485.29.
"The rise by equities in Hong Kong and Shanghai amid a suggestion by US President (Donald) Trump to China's president that they discuss issues, including the situation in Hong Kong, has supported the market," said Yutaka Miura, senior technical analyst at Mizuho Securities.
The Nikkei has lost 1.3% this week, during which an inversion of the US Treasury yield curve -widely regarded as a recession signal- triggered a global sell-off in riskier assets.
Some exporters fared a little better as the yen's advance against the dollar stalled. Nissan Motor Co was up 0.6%, Panasonic added 0.5% and Hitachi gained 0.6%.
Semiconductor manufacturer Renesas climbed 3.3% after its US peers such as Applied Materials Inc and Nvidia Corp posted upbeat results.
Other tech-related shares also gained, with Tokyo Electron rising 2% and Toshiba Corp adding 1.3%.
Unizo Holdings jumped 15.7% after the Nikkei daily reported that US investment firm Fortress Investment Group will offer to buy the hotel operator, launching a counter bid against travel agency H.I.S. Co.
H.I.S. rose 5.8% amid speculation that it could potentially pull back from a financially taxing takeover in the face of competition from Fortress.
Financial shares remained under pressure, with this week's sharp drop in bond yields seen hurting their profitability. Sumitomo Mitsui Financial Group was down 0.5% and Shinsei Bank shed 2%.
There were 131 advancers on the Nikkei index against 88 decliners.
The largest percentage gainer in the index was Daiwa House Industry Co, which rose 5.1%. The largest percentage loser was Recruit Holdings Co, which suffered a loss of 3.1%.
The volume of shares traded on the Tokyo Stock Exchange's main board was 0.86 billion, compared to the average of 1.13 billion yen in the past 30 days.